// limits standard header
#ifndef _LIMITS_
#define _LIMITS_
#include <ymath.h>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cwchar>
#include <xstddef>

_STD_BEGIN
//	ASSUMES:
//	wraparound 2's complement integer arithmetic w/o traps
//	all CHAR_BITs of each byte used by integers
//	IEC559 (IEEE 754) floating-point arithmetic
//	long double is 53, 64, or 113 bits
//	floating-point errors can trap
//	tinyness detected before floating-point rounding
//	64-bit long long (if _LONGLONG defined)

//	floating-point values:
//	MAX = (1 - 2^-PREC) * 2^MAXEXP
//	MIN = 2^(MINEXP - 1)
//	EPS = 2^(1 - PREC)
//	DEN = 2^(MINEXP - PREC)

 #define _STCONS(ty, name, val)	static _CONST_DATA ty name = (ty)(val)

 #define _FLT_MIN	1.175494351E-38F
 #define _FLT_MAX	3.402823466E+38F
 #define _FLT_EPSILON	1.192092896E-07F
 #define _FLT_TRUE_MIN	1.401298464E-45F

 #define _DBL_MIN	2.2250738585072014E-308
 #define _DBL_MAX	1.7976931348623157E+308
 #define _DBL_EPSILON	2.2204460492503131E-016
 #define _DBL_TRUE_MIN	4.9406564584124654E-324

 #if LDBL_MANT_DIG == 53
 #define _LDBL_MIN	2.2250738585072014E-308L
 #define _LDBL_MAX	1.7976931348623157E+308L
 #define _LDBL_EPSILON	2.2204460492503131E-016L
 #define _LDBL_TRUE_MIN	4.9406564584124654E-324L

 #elif LDBL_MANT_DIG == 64
 #define _LDBL_MIN	3.362103143112093506263E-4932L
 #define _LDBL_MAX	1.189731495357231765021E+4932L
 #define _LDBL_EPSILON	1.084202172485504434007E-19L
 #define _LDBL_TRUE_MIN	3.645199531882474602528E-4951L

 #elif LDBL_MANT_DIG == 133
 #define _LDBL_MIN	3.3621031431120935062626778173217526E-4932L
 #define _LDBL_MAX	1.1897314953572317650857593266280070E+4932L
 #define _LDBL_EPSILON	1.9259299443872358530559779425849273E-34L
 #define _LDBL_TRUE_MIN	6.4751751194380251109244389582276466E-4966L

 #else /* fail */
_STATIC_ASSERT2(false,
	"long double format unknown");
 #endif /* long double format */

 #if __EDG__
 #define _INF_LIMIT	__INFINITY__
 #define _NAN_LIMIT	__NAN__

 #else /* __EDG__ */
 #define _INF_LIMIT	(_Ty(1) / _Ty(0))
 #define _NAN_LIMIT	(_Ty(0) / _Ty(0))
 #endif /* __EDG__ */

		// ENUM float_denorm_style
typedef enum
	{	// constants for different IEEE float denormalization styles
	denorm_indeterminate = -1,
	denorm_absent = 0,
	denorm_present = 1}
		float_denorm_style;

		// ENUM float_round_style
typedef enum
	{	// constants for different IEEE rounding styles
	round_indeterminate = -1,
	round_toward_zero = 0,
	round_to_nearest = 1,
	round_toward_infinity = 2,
	round_toward_neg_infinity = 3}
		float_round_style;

		// STRUCT _Num_base
struct _Num_base
	{	// base for all types, with common defaults
	_STCONS(float_denorm_style, has_denorm, denorm_absent);
	_STCONS(bool, has_denorm_loss, false);
	_STCONS(bool, has_infinity, false);
	_STCONS(bool, has_quiet_NaN, false);
	_STCONS(bool, has_signaling_NaN, false);
	_STCONS(bool, is_bounded, false);
	_STCONS(bool, is_exact, false);
	_STCONS(bool, is_iec559, false);
	_STCONS(bool, is_integer, false);
	_STCONS(bool, is_modulo, false);
	_STCONS(bool, is_signed, false);
	_STCONS(bool, is_specialized, false);
	_STCONS(bool, tinyness_before, false);
	_STCONS(bool, traps, false);
	_STCONS(float_round_style, round_style, round_toward_zero);
	_STCONS(int, digits, 0);
	_STCONS(int, digits10, 0);

 #if _HAS_CPP0X
	_STCONS(int, max_digits10, 0);
 #endif /* _HAS_CPP0X */

	_STCONS(int, max_exponent, 0);
	_STCONS(int, max_exponent10, 0);
	_STCONS(int, min_exponent, 0);
	_STCONS(int, min_exponent10, 0);
	_STCONS(int, radix, 0);
	};

		// TEMPLATE CLASS numeric_limits
template<class _Ty>
	class numeric_limits
		: public _Num_base
	{	// numeric limits for arbitrary type _Ty (say little or nothing)
public:
	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (_Ty());
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_Ty());
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return (_Ty());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (_Ty());
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (_Ty());
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (_Ty());
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (_Ty());
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (_Ty());
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (_Ty());
		}
	};

template<class _Ty>
	class numeric_limits<const _Ty>
		: public numeric_limits<_Ty>
	{	// numeric limits for const types
	};

template<class _Ty>
	class numeric_limits<volatile _Ty>
		: public numeric_limits<_Ty>
	{	// numeric limits for volatile types
	};

template<class _Ty>
	class numeric_limits<const volatile _Ty>
		: public numeric_limits<_Ty>
	{	// numeric limits for const volatile types
	};

		// STRUCT _Num_int_base
struct _Num_int_base
	: public _Num_base
	{	// base for integer types
	_STCONS(bool, is_bounded, true);
	_STCONS(bool, is_exact, true);
	_STCONS(bool, is_integer, true);
	_STCONS(bool, is_modulo, true);
	_STCONS(bool, is_specialized, true);
	_STCONS(int, radix, 2);
	};

		// STRUCT _Num_float_base
struct _Num_float_base
	: public _Num_base
	{	// base for floating-point types
	_STCONS(float_denorm_style, has_denorm, denorm_present);
	_STCONS(bool, has_denorm_loss, true);
	_STCONS(bool, has_infinity, true);
	_STCONS(bool, has_quiet_NaN, true);
	_STCONS(bool, has_signaling_NaN, true);
	_STCONS(bool, is_bounded, true);
	_STCONS(bool, is_exact, false);
	_STCONS(bool, is_iec559, true);
	_STCONS(bool, is_integer, false);
	_STCONS(bool, is_modulo, false);
	_STCONS(bool, is_signed, true);
	_STCONS(bool, is_specialized, true);
	_STCONS(bool, tinyness_before, true);
	_STCONS(bool, traps, false);
	_STCONS(float_round_style, round_style, round_to_nearest);
	_STCONS(int, radix, FLT_RADIX);
	};

		// CLASS numeric_limits<char>
template<> class numeric_limits<char>
	: public _Num_int_base
	{	// limits for type char
public:
	typedef char _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (CHAR_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (CHAR_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, CHAR_MIN != 0);
	_STCONS(int, digits, CHAR_BIT - (CHAR_MIN != 0 ? 1 : 0));
	_STCONS(int, digits10, (CHAR_BIT - (CHAR_MIN != 0 ? 1 : 0))
		* 301L / 1000);
	};

		// CLASS numeric_limits<wchar_t>
template<> class numeric_limits<wchar_t>
	: public _Num_int_base
	{	// limits for type wchar_t
public:
	typedef wchar_t _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return ((_Ty)WCHAR_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return ((_Ty)WCHAR_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, WCHAR_MIN != 0);
	_STCONS(int, digits, CHAR_BIT * sizeof (wchar_t)
		- (WCHAR_MIN != 0 ? 1 : 0));
	_STCONS(int, digits10, (CHAR_BIT * sizeof (wchar_t)
		- (WCHAR_MIN != 0 ? 1 : 0)) * 301L / 1000);
	};

		// CLASS numeric_limits<bool>
template<> class numeric_limits<bool>
	: public _Num_int_base
	{	// limits for type bool
public:
	typedef bool _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (false);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (true);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_modulo, false);
	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, 1);
	_STCONS(int, digits10, 0);
	};

		// CLASS numeric_limits<signed char>
template<> class numeric_limits<signed char>
	: public _Num_int_base
	{	// limits for type signed char
public:
	typedef signed char _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (SCHAR_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (SCHAR_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, true);
	_STCONS(int, digits, CHAR_BIT - 1);
	_STCONS(int, digits10, (CHAR_BIT - 1) * 301L / 1000);
	};

		// CLASS numeric_limits<unsigned char>
template<> class numeric_limits<unsigned char>
	: public _Num_int_base
	{	// limits for type unsigned char
public:
	typedef unsigned char _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (UCHAR_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT);
	_STCONS(int, digits10, CHAR_BIT * 301L / 1000);
	};

		// CLASS numeric_limits<short>
template<> class numeric_limits<short>
	: public _Num_int_base
	{	// limits for type short
public:
	typedef short _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (SHRT_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (SHRT_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, true);
	_STCONS(int, digits, CHAR_BIT * sizeof (short) - 1);
	_STCONS(int, digits10, (CHAR_BIT * sizeof (short) - 1)
		* 301L / 1000);
	};

		// CLASS numeric_limits<unsigned short>
template<> class numeric_limits<unsigned short>
	: public _Num_int_base
	{	// limits for type unsigned short
public:
	typedef unsigned short _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (USHRT_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (unsigned short));
	_STCONS(int, digits10, CHAR_BIT * sizeof (unsigned short)
		* 301L / 1000);
	};

 #if _HAS_CHAR16_T_LANGUAGE_SUPPORT
		// CLASS numeric_limits<char16_t>
template<> class numeric_limits<char16_t>
	: public _Num_int_base
	{	// limits for type char16_t
public:
	typedef char16_t _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (USHRT_MAX);
		}

	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (char16_t));
	_STCONS(int, digits10, CHAR_BIT * sizeof (char16_t)
		* 301L / 1000);
	};
 #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */

		// CLASS numeric_limits<int>
template<> class numeric_limits<int>
	: public _Num_int_base
	{	// limits for type int
public:
	typedef int _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (INT_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (INT_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, true);
	_STCONS(int, digits, CHAR_BIT * sizeof (int) - 1);
	_STCONS(int, digits10, (CHAR_BIT * sizeof (int) - 1)
		* 301L / 1000);
	};

		// CLASS numeric_limits<unsigned int>
template<> class numeric_limits<unsigned int>
	: public _Num_int_base
	{	// limits for type unsigned int
public:
	typedef unsigned int _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (UINT_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (unsigned int));
	_STCONS(int, digits10, CHAR_BIT * sizeof (unsigned int)
		* 301L / 1000);
	};

		// CLASS numeric_limits<long>
template<> class numeric_limits<long>
	: public _Num_int_base
	{	// limits for type long
public:
	typedef long _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (LONG_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (LONG_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, true);
	_STCONS(int, digits, CHAR_BIT * sizeof (long) - 1);
	_STCONS(int, digits10, (CHAR_BIT * sizeof (long) - 1)
		* 301L / 1000);
	};

		// CLASS numeric_limits<unsigned long>
template<> class numeric_limits<unsigned long>
	: public _Num_int_base
	{	// limits for type unsigned long
public:
	typedef unsigned long _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (ULONG_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (unsigned long));
	_STCONS(int, digits10, CHAR_BIT * sizeof (unsigned long)
		* 301L / 1000);
	};

 #if _HAS_CHAR16_T_LANGUAGE_SUPPORT
		// CLASS numeric_limits<char32_t>
template<> class numeric_limits<char32_t>
	: public _Num_int_base
	{	// limits for type char32_t
public:
	typedef char32_t _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (UINT_MAX);
		}

	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (char32_t));
	_STCONS(int, digits10, CHAR_BIT * sizeof (char32_t)
		* 301L / 1000);
	};
 #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */

 #ifdef _LONGLONG
		// CLASS numeric_limits<_LONGLONG>
template<> class numeric_limits<_LONGLONG>
	: public _Num_int_base
	{	// limits for type long long
public:
	typedef _LONGLONG _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (-_LLONG_MAX - _C2);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_LLONG_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, true);
	_STCONS(int, digits, CHAR_BIT * sizeof (_LONGLONG) - 1);
	_STCONS(int, digits10, (CHAR_BIT * sizeof (_LONGLONG) - 1)
		* 301L / 1000);
	};

		// CLASS numeric_limits<_ULONGLONG>
template<> class numeric_limits<_ULONGLONG>
	: public _Num_int_base
	{	// limits for type unsigned long long
public:
	typedef _ULONGLONG _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (0);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_ULLONG_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return ((min)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (0);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (0);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (0);
		}

	static _CONST_FUN0 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (0);
		}

	static _CONST_FUN0 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (0);
		}

	_STCONS(bool, is_signed, false);
	_STCONS(int, digits, CHAR_BIT * sizeof (_ULONGLONG));
	_STCONS(int, digits10, CHAR_BIT * sizeof (_ULONGLONG)
		* 301L / 1000);
	};
 #endif /* _LONGLONG */

		// CLASS numeric_limits<float>
template<> class numeric_limits<float>
	: public _Num_float_base
	{	// limits for type float
public:
	typedef float _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (_FLT_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_FLT_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return (-(max)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (_FLT_EPSILON);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0.5F);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (_FLT_TRUE_MIN);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (_INF_LIMIT);
		}

	static _CONST_FUN2 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (_CSTD _FNan._Float);
		}

	static _CONST_FUN2 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (_CSTD _FSnan._Float);
		}

	_STCONS(int, digits, FLT_MANT_DIG);
	_STCONS(int, digits10, FLT_DIG);

 #if _HAS_CPP0X
	_STCONS(int, max_digits10, 2 + FLT_MANT_DIG * 301L / 1000);
 #endif /* _HAS_CPP0X */

	_STCONS(int, max_exponent, (int)FLT_MAX_EXP);
	_STCONS(int, max_exponent10, (int)FLT_MAX_10_EXP);
	_STCONS(int, min_exponent, (int)FLT_MIN_EXP);
	_STCONS(int, min_exponent10, (int)FLT_MIN_10_EXP);
	};

		// CLASS numeric_limits<double>
template<> class numeric_limits<double>
	: public _Num_float_base
	{	// limits for type double
public:
	typedef double _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (_DBL_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_DBL_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return (-(max)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (_DBL_EPSILON);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0.5);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (_DBL_TRUE_MIN);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (_INF_LIMIT);
		}

	static _CONST_FUN2 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (_CSTD _Nan._Double);
		}

	static _CONST_FUN2 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (_CSTD _Snan._Double);
		}

	_STCONS(int, digits, DBL_MANT_DIG);
	_STCONS(int, digits10, DBL_DIG);

 #if _HAS_CPP0X
	_STCONS(int, max_digits10, 2 + DBL_MANT_DIG * 301L / 1000);
 #endif /* _HAS_CPP0X */

	_STCONS(int, max_exponent, (int)DBL_MAX_EXP);
	_STCONS(int, max_exponent10, (int)DBL_MAX_10_EXP);
	_STCONS(int, min_exponent, (int)DBL_MIN_EXP);
	_STCONS(int, min_exponent10, (int)DBL_MIN_10_EXP);
	};

		// CLASS numeric_limits<long double>
template<> class numeric_limits<long double>
	: public _Num_float_base
	{	// limits for type long double
public:
	typedef long double _Ty;

	static _CONST_FUN0 _Ty (min)() _THROW0()
		{	// return minimum value
		return (_LDBL_MIN);
		}

	static _CONST_FUN0 _Ty (max)() _THROW0()
		{	// return maximum value
		return (_LDBL_MAX);
		}

 #if _HAS_CPP0X
	static _CONST_FUN0 _Ty lowest() _THROW0()
		{	// return most negative value
		return (-(max)());
		}
 #endif /* _HAS_CPP0X */

	static _CONST_FUN0 _Ty epsilon() _THROW0()
		{	// return smallest effective increment from 1.0
		return (_LDBL_EPSILON);
		}

	static _CONST_FUN0 _Ty round_error() _THROW0()
		{	// return largest rounding error
		return (0.5L);
		}

	static _CONST_FUN0 _Ty denorm_min() _THROW0()
		{	// return minimum denormalized value
		return (_LDBL_TRUE_MIN);
		}

	static _CONST_FUN0 _Ty infinity() _THROW0()
		{	// return positive infinity
		return (_INF_LIMIT);
		}

	static _CONST_FUN2 _Ty quiet_NaN() _THROW0()
		{	// return non-signaling NaN
		return (_CSTD _LNan._Long_double);
		}

	static _CONST_FUN2 _Ty signaling_NaN() _THROW0()
		{	// return signaling NaN
		return (_CSTD _LSnan._Long_double);
		}

	_STCONS(int, digits, LDBL_MANT_DIG);
	_STCONS(int, digits10, LDBL_DIG);

 #if _HAS_CPP0X
	_STCONS(int, max_digits10, 2 + LDBL_MANT_DIG * 301L / 1000);
 #endif /* _HAS_CPP0X */

	_STCONS(int, max_exponent, (int)LDBL_MAX_EXP);
	_STCONS(int, max_exponent10, (int)LDBL_MAX_10_EXP);
	_STCONS(int, min_exponent, (int)LDBL_MIN_EXP);
	_STCONS(int, min_exponent10, (int)LDBL_MIN_10_EXP);
	};

#undef _INF_LIMIT
#undef _NAN_LIMIT
_STD_END
#endif /* _LIMITS_ */

/*
 * Copyright (c) by P.J. Plauger. All rights reserved.
 * Consult your license regarding permissions and restrictions.
V6.50:1422 */
